package com.kingtsoft.study.webserivce;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.kingtsoft.study.model.StudyHomework;
import com.kingtsoft.study.model.StudyHomeworkDetail;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

public interface WebStudyHomeworkService {

    /**
     * 获取作业
     *
     * @param id 作业主键
     * @return 作业
     * @author jerry.pan
     * @date 2017-03-30 15:08:11
     */
    StudyHomework load(String id);

    /**
     * 分页获取老师布置的作业的列表
     *
     * @return pageInfo
     * @author jerry.pan
     * @date 2017-03-30 15:08:11
     */
    PageInfo<StudyHomework> listPage(PageInfo page, StudyHomework studyHomework);

    /**
     * 获取老师布置的作业的列表
     *
     * @return list
     * @author jerry.pan
     * @date 2017-03-30 15:08:11
     */
    List<StudyHomework> listAll(StudyHomework studyHomework);

    /**
    *
    * @Title: addHomework
    * @Description: 老师发布作业，保存homework
    * @author: shenlx
    * @param studyHomework
    * @return: void
    */
   public void addHomework(StudyHomework studyHomework);


    /**
     * 保存上传文件
     *
     * @param file
     * @param studyHomework
     * @return
     * @author jerry.pan
     * @date 2017-04-12 16:00:59
     */
    StudyHomework saveUpload(MultipartFile file, StudyHomework studyHomework);


    /**
     * 下载文件
     * @param response
     * @param id
     * @author jerry.pan
     * @date 2017-04-12 16:00:59
     */
    void downloadFile(HttpServletResponse response, String id);


    /**
     * 删除上传文件
     *
     * @param
     * @author jerry.pan
     * @date 2017-04-12 16:00:59
     */
    void deleteFile(String id);

}
